#ifndef LOGIN_H
#define LOGIN_H

#include <QWidget>
#include <QString>
#include "execsql.h"
#include"admininfo.h"
#include "studentinfo.h"
#include"teacherinfo.h"
#include "admin.h"
#include "student.h"
#include "teacher.h"
#include <QProcess>
#include"forgrt.h"

namespace Ui {
    class Login;
}

class Login : public QWidget
{
    Q_OBJECT

public:
    explicit Login(QWidget *parent = 0);
    ~Login();
    void showAdminW(void);
    void showStudentW(void);
    void showTeacherW(void);
     QString &getdata() const;

signals:
     void signalAdminLoginSuccess(AdminInfo info);
     void signalStudentLoginSuccess( StudentInfo info);
     void signalTeacherLoginSuccess( TeacherInfo info);

public slots:
     void slotsenddata();

private slots:
    void on_pb_tealongin_clicked();
    void on_pb_stulongin_clicked();
    void on_pb_facelongin_clicked();
    void on_pb_peologin_clicked();
    void on_pb_pwdlogin_clicked();
    void on_pb_login_clicked();

    void on_pb_forgetpwd_clicked();

private:
    void initWindow();
    Ui::Login *ui;
    QString table_pwd;
    unsigned int actor;
    unsigned int active;
    StudentInfo infoS;
    TeacherInfo infoT;
    AdminInfo infoA;
    Admin m_adminW;
    Teacher m_teacherW;
    Student m_studentW;
    QProcess prologin;
    Forgrt *w ;


};

#endif // LOGIN_H
